package server.business.pojo;

import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.alibaba.excel.annotation.write.style.ContentRowHeight;
import com.alibaba.excel.annotation.write.style.HeadRowHeight;
import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

/**
 * 
 * @TableName blood_donor
 * @author
 */
@Data
@Accessors(chain = true)
@TableName(value ="blood_donor")
@ColumnWidth(20) //列宽
@ContentRowHeight(20)//数据行高
@HeadRowHeight(30)//表头高
@ExcelIgnoreUnannotated   //解决不加ExcelProperty注解的，也会出现在excel中

public class DonReg implements Serializable {
    /**
     * 编号
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 创建时间
     */
    @TableField(value = "gmt_create",fill = FieldFill.INSERT)
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    private Date gmtCreate;

    /**
     * 献血证编号
     */
    @TableField(value = "certificate_number", fill = FieldFill.INSERT)
    @ExcelProperty(value = "献血证编号",index = 0)
    private String certificateNumber;

    /**
     * 患者信息表中的患者姓名
     */
    @TableField(value = "name")
    @ExcelProperty(value = "姓名",index = 1)
    private String name;

    /**
     * 证件类型
     */
    @TableField(value = "idcard_type")
    @ExcelProperty(value = "证件类型",index = 2)
    private String idcardType;

    /**
     * 修改时间
     */
    @TableField(value = "gmt_modified", fill = FieldFill.UPDATE)
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @ExcelProperty(value = "更新时间",index = 3)
    private Date gmtModified;

    /**
     * 身份证号
     */
    @TableField(value = "idcard")
    @ExcelProperty(value = "身份证号",index = 4)
    private String idcard;

    /**
     * 献血时间
     */
    @TableField(value = "donation_time")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @JsonFormat(locale = "zh", timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    @ExcelProperty(value = "献血时间",index = 5)
    private Date donationTime;

    /**
     * 献血地点
     */
    @TableField(value = "location")
    @ExcelProperty(value = "献血地点",index = 6)
    private String location;

    /**
     * 咨询电话
     */
    @TableField(value = "phone_number")
    @ExcelProperty(value = "咨询电话",index = 7)
    private String phoneNumber;

    /**
     * 献血证发证单位
     */
    @TableField(value = "unit")
    @ExcelProperty(value = "献血证发证单位",index = 8)
    private String unit;

    /**
     * 采血者编号
     */
    @TableField(value = "draw_people_number")
    @ExcelProperty(value = "采血者编号",index = 9)
    private String drawPeopleNumber;

    /**
     * 采血者姓名
     */
    @TableField(value = "draw_people")
    @ExcelProperty(value = "采血者姓名",index = 10)
    private String drawPeople;

    /**
     * 初筛血型
     */
    @TableField(value = "human_blood_type")
    @ExcelProperty(value = "初筛血型",index = 11)
    private String humanBloodType;

    /**
     * 献血量
     */
    @TableField(value = "blood_volume")
    @ExcelProperty(value = "献血量",index = 11)
    private String bloodVolume;

    /**
     * 献血类别
     */
    @TableField(value = "blood_type")
    @ExcelProperty(value = "献血类别",index = 13)
    private String bloodType;

    /**
     * 既往病史
     */
    @TableField(value = "medical_history")
    @ExcelProperty(value = "既往病史",index = 14)
    private String medicalHistory;

    /**
     * 既往输血史
     */
    @TableField(value = "tansfusion_history")
    @ExcelProperty(value = "既往输血史",index = 15)
    private String tansfusionHistory;

    /**
     * 属地
     */
    @TableField(value = "territorial")
    @ExcelProperty(value = "属地",index = 16)
    private String territorial;

    @TableField(exist = false)
    private static final long serialVersionUID = -8047086080910252385L;
}